<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page isELIgnored ="false" %> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>      
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>게시판 조회</title>
</head>
<body>
<h3>게시판 목록보기</h3>
<hr>
<br>
${ipg } / ${pageCount } <br>
<table border="1" width="800">
<tr>
	<td>id</td><td>제목</td><td>이름</td><td>조회수</td><td>등록일</td>
</tr>
<c:forEach items="${list}"  var="board"  varStatus="status">
<tr>
	<td>${board.id }</td>
	<td width="400"><a href="read?id=${board.id }">${board.title }</a></td>
	<td>${board.name }</td>
	<td>${board.readcount }</td>
	<td>${board.regdate }</td>
</tr>
</c:forEach>
</table>

<br><br>
<c:if test="${ipg > 1}" >
<a href="list?pg=${ipg -1 }">이전페이지</a>&nbsp;&nbsp;&nbsp;
</c:if>
<c:if test="${ipg <= 1}" >
이전페이지&nbsp;&nbsp;&nbsp;
</c:if>

<c:if test="${ipg < pageCount}" >
<a href="list?pg=${ipg+1}">이후페이지</a>&nbsp;&nbsp;&nbsp;
</c:if>
<c:if test="${ipg >= pageCount}" >
이후페이지
</c:if>

<a href=writeform>글쓰기</a>

</body>
</html>